import { APPQRCODE, IS_DEV } from '../config';
const stageSuffix = IS_DEV ? '-dev': ''

// COS相关的配置信息
export const COS_CONF = {
    bucketPrefix: `bgp${stageSuffix}`,
    bucket: `bgp${stageSuffix}-1306337005`,
    region: 'ap-shanghai',
    path: `https://bgp${stageSuffix}.bucket.biling.club`,
    param: '?imageView2/1/w/400/h/400/q/100',
    headerParam: '?imageView2/1/w/750/h/750/q/100',
    detailParam: '?imageView2/1/w/375/h/375/q/100',
    adParam: '?imageView2/1/w/345/h/140/q/100',
    defaultPic: 'operation/images/default-pic.png',
};

// 组件参数
export const COMPONENT_OPTIONS = {
    addGlobalClass: true,
    styleIsolation: 'shared',
    multipleSlots: true,
};

// 目标类型
export const TARGET_TYPE = {
    brand: 'brand', // 品牌
    store: 'store', // 店铺
    user: 'user', // 用户,
    spokesman: 'spokesman', // 代言人
    distributor: 'distributor', // 分销员
};

// 提现类型
export const WITHDRAW_TYPE = {
    change: 'wechat_change_purse',
    bank: 'bank-card',
};
export const WITHDRAW_TYPE_TEXT = {
    [WITHDRAW_TYPE.change]: '提现至微信零钱',
    [WITHDRAW_TYPE.bank]: '提现至银行卡',
};

// 资金明细类型
export const ACCOUNT_LOG_CATEGORY = {
    redemption: 'redemption', // 冲红(+/-)
    order: 'order', // 订单 (+)
    refund: 'refund', // 退款 (-)
    bonus: 'order_bonus_profit', // 订单奖励金 (-)
    bonusRollback: 'rollback_bonus_profit', // 订单奖励金回退 
    withdraw: 'withdraw', // 提现 (-)
};
export const ACCOUNT_LOG_CATEGORY_TEXT = {
    [ACCOUNT_LOG_CATEGORY.redemption]: '冲红',
    [ACCOUNT_LOG_CATEGORY.order]: '订单',
    [ACCOUNT_LOG_CATEGORY.refund]: '退款',
    [ACCOUNT_LOG_CATEGORY.bonus]: '订单奖励金',
    [ACCOUNT_LOG_CATEGORY.bonusRollback]: '订单奖励金回退',
    [ACCOUNT_LOG_CATEGORY.withdraw]: '提现',
};

// 提现状态
export const WITHDRAW_LOG_STATUS = {
    wait: 'AWAIT',
    submit: 'SUBMITTED',
    create: 'CREATE_SUCCESS',
    pending: 'PENDING',
    success: 'SUCCESS',
    fail: 'FAIL',
    refund: 'REFUND',
    close: 'CLOSE',
    init: 'INIT',
};
export const WITHDRAW_LOG_STATUS_TEXT = {
    [WITHDRAW_LOG_STATUS.wait]: '待提交',
    [WITHDRAW_LOG_STATUS.submit]: '已提交',
    [WITHDRAW_LOG_STATUS.create]: '受理成功',
    [WITHDRAW_LOG_STATUS.pending]: '提现中',
    [WITHDRAW_LOG_STATUS.success]: '已到账',
    [WITHDRAW_LOG_STATUS.fail]: '提现失败',
    [WITHDRAW_LOG_STATUS.refund]: '提现退票',
    [WITHDRAW_LOG_STATUS.close]: '关单',
    [WITHDRAW_LOG_STATUS.init]: '业务单已创建',
};

// 活动类型
export const ACTIVITY_TYPE = {
    group_buying: 'group_buying__1', // 社区团购
    lottery: 'lottery__1', // 抽奖(第一型态)
    signin: 'check_in__1', // 每日签到
};

// 活动类型配置
export const ACTIVITY_TYPE_MAP = {
    [ACTIVITY_TYPE.group_buying]: {
        value: ACTIVITY_TYPE.group_buying,
        name: '社群团购',
        backgroundColor: '#DEFFEA',
        color: '#16BC52',
        icon: 'sns',
    },
    [ACTIVITY_TYPE.lottery]: {
        value: ACTIVITY_TYPE.lottery,
        name: '幸运抽奖',
        backgroundColor: '#FFEAE7',
        color: '#FD5943',
        icon: 'wheel',
    },
};

// 加粉类型
export const SNS_TYPE = {
    wechatNo: 'wechatNo',
    wechatGroup: 'wechatGroup',
    miniApp: 'miniApp',
    wechatWp: 'wechatWp',
};
export const SNS_TYPE_ENUM = {
    [SNS_TYPE.wechatNo]: {
        value: SNS_TYPE.wechatNo,
        name: '微信号',
        icon: 'sns-wechat',
        btnText: '加好友',
    },
    [SNS_TYPE.wechatGroup]: {
        value: SNS_TYPE.wechatGroup,
        name: '微信群',
        icon: 'sns-group',
        btnText: '立即入群',
    },
    [SNS_TYPE.miniApp]: {
        value: SNS_TYPE.miniApp,
        name: '小程序',
        icon: 'sns-miniapp',
        btnText: '立即体验',
    },
    [SNS_TYPE.wechatWp]: {
        value: SNS_TYPE.wechatWp,
        name: '公众号',
        icon: 'sns-wp',
        btnText: '前往关注',
    },
};
export const SNS_TYPE_MENU = [
    SNS_TYPE_ENUM[SNS_TYPE.wechatNo],
    SNS_TYPE_ENUM[SNS_TYPE.wechatGroup],
    SNS_TYPE_ENUM[SNS_TYPE.miniApp],
    SNS_TYPE_ENUM[SNS_TYPE.wechatWp]
];

// 中文
export const NUMERAL_ZH = {
    1: '一',
    2: '二',
    3: '三',
    4: '四',
    5: '五',
    6: '六',
    7: '七',
    8: '八',
    9: '九',
};

// 周中文
export const WEEK_ZH = {
    1: '一',
    2: '二',
    3: '三',
    4: '四',
    5: '五',
    6: '六',
    7: '日',
};

// 奖品兑奖状态
export const AWARD_STATUS = {
    wait: 'wait',
    used: 'used',
    invalid: 'invalid',
};

// 品牌默认背景图列表
export const BRAND_BG_LIST = [
];

// 用户默认背景图列表
export const USER_BG_LIST = [
];

// 活动默认背景图列表
export const ACTIVITY_BG_LIST = [
];

// 页面追踪枚举
export const PAGE_OF_C = {
    HOME: 'home',
    USER_HOME: 'user_home',
    USER_INVITATION:'user_invitation',
    BRAND_HOME: 'brand_home',
    BRAND_ENDORSEMENT: 'brand_endorsement',
    GROUP_BUYING_1_HOME: 'group_buying_1_home',
    CHECK_IN_1_HOME: 'check_in_1_home',
    LOTTERY_1_HOME: 'lottery_1_home',
    OTHER: 'other',
};

// 默认背景图列表
export const DEFAULT_BG_LIST = [
    'operation/images/default-bg-1.png',
    'operation/images/default-bg-2.png',
    'operation/images/default-bg-3.png',
    'operation/images/default-bg-4.png',
    'operation/images/default-bg-5.png',
    'operation/images/default-bg-6.png',
    'operation/images/default-bg-7.png',
    'operation/images/default-bg-8.png',
    'operation/images/default-bg-9.png',
    'operation/images/default-bg-10.png',
    'operation/images/default-bg-11.png',
];

// 默认分享图
export const DEFAULT_SHARE_IMAGE = 'operation/images/default-share-pic-1.png';

// 默认分享文案
export const DEFAULT_SHARE_TITLE = '大家都在用的社群神器，快来了解一下～';

// 默认商户pic(logo)
export const DEFAULT_BRAND_PIC = '';

// 默认用户pic(头像)
export const DEFAULT_USER_PIC = '';

// 默认小程序码
export const DEFAULT_MINI_QRCODE = APPQRCODE;
